﻿@model XSTDZ.ERP.Application.DataContracts.WagesBillDto

@{
    ViewBag.Title = " - 编辑工资工单";
}
@section header{
     <link href="@Url.Content("~/Content/Controls.css")" rel="stylesheet" type="text/css" />
     <link href="@Url.Content("~/Content/Form.css")" rel="stylesheet" type="text/css" />
}

<h2>编辑工资工单</h2>

<div class="wp100">
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <table class="formtable">
    <thead>
        <tr>
            <th colspan="4">@* <h2>新增入库单</h2>*@
            <div id="toptoolbar"></div>
            </th>
        </tr>
    </thead>

        <tr>
        <td class="title"> @Html.LabelFor(model => model.WagesBillNO)</td>
        <td> 
        @Html.TextBoxFor(model => model.WagesBillNO, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.WagesBillNO)
         </td>

        <td class="title"> @Html.LabelFor(model => model.WorkGroupID)</td>
        <td>@* @Html.TextBoxFor(model => model.WorkGroupName, new { @class = "text disablebg", @readonly = "readonly" })*@
        @Html.DropDownListFor(model => model.WorkGroupID, ViewBag.WorkGroupNames as IEnumerable<SelectListItem>, new { @class = "select" })
        @Html.ValidationMessageFor(model => model.WorkGroupID)
          @Html.HiddenFor(model => model.Id)
           @Html.HiddenFor(model => model.BillState)
        </td>

        
  </tr>
      
     <tr>
        <td class="title"> @Html.LabelFor(model => model.StartDate)</td>
        <td> @Html.TextBoxFor(model => model.StartDate, new { @class = "text disablebg", @readonly = "readonly" })
        <input type="hidden" value="@Model.StartDate" id="StartDateVal" name="StartDateVal" />
        @Html.ValidationMessageFor(model => model.StartDate)
        </td>

         <td class="title"> @Html.LabelFor(model => model.EndDate)</td>
        <td> @Html.TextBoxFor(model => model.EndDate, new { @class = "text disablebg", @readonly = "readonly" })
        <input type="hidden" value="@Model.EndDate" id="EndDateVal" name="EndDateVal" />
        @Html.ValidationMessageFor(model => model.EndDate)
        </td>
  </tr>
    <tr>
       @* <td class="title"> @Html.LabelFor(model => model.PieceWages)</td>
        <td> @Html.TextBoxFor(model => model.PieceWages, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.PieceWages)
        </td>*@

         <td class="title"> @Html.LabelFor(model => model.SumScrapMoney)</td>
        <td> @Html.TextBoxFor(model => model.SumScrapMoney, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.SumScrapMoney)
        </td>

        <td class="title"> @Html.LabelFor(model => model.HeadmanAward)</td>
        <td> @Html.TextBoxFor(model => model.HeadmanAward, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.HeadmanAward)
        </td>

         @*<td class="title"> @Html.LabelFor(model => model.LiftMoney)</td>
        <td> @Html.TextBoxFor(model => model.LiftMoney, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.LiftMoney)
        </td>*@
  </tr>
      <tr>
      @*  <td class="title"> @Html.LabelFor(model => model.OtherMoney)</td>
        <td> @Html.TextBoxFor(model => model.OtherMoney, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.OtherMoney)
        </td>*@

         <td class="title"> @Html.LabelFor(model => model.SumSubsidyMoney)</td>
        <td> @Html.TextBoxFor(model => model.SumSubsidyMoney, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.SumSubsidyMoney)
        </td>
          <td class="title"></td>
        <td>  <input type="button" value="确  定"  class="btnStyle" id="okBtn" name="okBtn" style=" display:none;" /></td>
  </tr>   
       
     @* <tr>
        <td class="title"> @Html.LabelFor(model => model.Wages)</td>
        <td> @Html.TextBoxFor(model => model.Wages, new { @class = "text disablebg", @readonly = "readonly" })
        @Html.ValidationMessageFor(model => model.Wages)
        </td>

         <td class="title"></td>
        <td> 
        </td>
  </tr> *@


    </table>
}
  <input type="hidden" value="@Guid.Empty" name="hidEmpty" id="hidEmpty" />
</div>
<div class="wp100">
<div id="workGroupUserWageGrid" style="margin-top:20px" ></div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        //开始时间
        $("#StartDate").ligerDateEditor({ showTime: true, format: "yyyy-MM-dd", labelWidth: 140, labelAlign: 'left' });
        $("#StartDate").ligerGetDateEditorManager().setValue($("#StartDateVal").val());
        //结束时间
        $("#EndDate").ligerDateEditor({ showTime: true, format: "yyyy-MM-dd", labelWidth: 140, labelAlign: 'left' });
        $("#EndDate").ligerGetDateEditorManager().setValue($("#EndDateVal").val());

        $("#submitBtn").unbind("click").bind("click", function () { getProductBillItemData(false); }); //保存
        $("#btnSubmit").unbind("click").bind("click", function () { getProductBillItemData(true); }); //提交
    });

 
  </script>

<script type="text/javascript" src="@Url.Content("~/Content/js/Wages/Add.js")"></script>

